<template>
  <div class="wego_index" :class="[leftClass ? 'leftclass' : 'rightClass' ]">
    <div class="wego_logo">
      <span class="logo"><img :src="mainRightModel.logo" alt=""></span>
      <p class="module_name">{{mainRightModel.name}}</p>
    </div>
    <!-- wego_logo -->
    <div class="wego_info_pane">
      <div class="wego_info_item pl36">
        <div class="wego_item_list">
          <h4><i class="iconfont icon-qiandai">订单实际总收入(万元)</i></h4>
          <p class="wego_item_money">{{ baseInfo.cffOrderAmount  }}</p>
        </div>
      </div>
      <!-- wego_info_item -->
      <div class="wego_info_item pr36">
        <div class="wego_item_list">
          <h4><i class="iconfont icon-group">总注册人数(人)</i></h4>
          <p class="wego_item_money">{{ baseInfo.cfregisterAmount }}</p>
        </div>
      </div>
      <!-- wego_info_item -->
    </div>
    <!-- wego_info_pane -->

    <div class="wego_info_pane pinit">
      <span class="midLine"></span>
      <div class="wego_info_item wego_info_other">
        <h4>押金总额(万元)</h4>
        <p>{{baseInfo.cffDepositAmount}}</p>
      </div>
      <!-- wego_info_item -->
      <div class="wego_info_item wego_info_other">
        <h4>本月下单人数(人)</h4>
        <p>{{baseInfo.cforderPersonNumber}}</p>
      </div>
      <!-- wego_info_item -->
    </div>
    <!-- wego_info_pane -->

     <div class="wego_info_pane pinit">
      <span class="midLine"></span>
      <div class="wego_info_item wego_info_other">
        <h4>可使用车辆(辆)</h4>
        <p>{{baseInfo.cfavilableVehicleAmount}}</p>
      </div>
      <!-- wego_info_item -->
      <div class="wego_info_item wego_info_other">
        <h4>在租车辆(辆)</h4>
        <p>{{baseInfo.cfrentVehicleAmount}}</p>
      </div>
      <!-- wego_info_item -->
    </div>
    <!-- wego_info_pane -->
    <div class="wego_info_pane ptinit">
      <div class="wego_info_item pl40">
        <line-bar :eData="echartsObj[0]"></line-bar>
      </div>
      <div class="wego_info_item pl40">
        <line-bar :eData="echartsObj[1]"></line-bar>
      </div>
    </div>
  </div>
</template>

<script>
import LineBar from '../bar/lineBar';

export default {
  props: {
    leftClass: {
      type: Boolean,
      default: () => {
        return false
      }
    },
    mainRightModel: {
      type: Object,
      default: () => {
        return {}
      }
    },
    baseInfo: {
      type: Object,
      default: () => {
        return null
      }
    },
    echartsObj: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  components: {
    LineBar
  },
}
</script>


<style lang="less" scoped>
  .wego_index{
    width: 9.1rem;
    background: #222943;
    border-radius: 10px;
    height: auto;
    .leftclass{
      margin-right: 0.12rem;
    }
    .rightClass{
      margin-left: 0.12rem
    }
    .wego_logo{
      position: relative;
      padding-left: 1.08rem;
      height: 0.98rem;
      .logo{
        position: absolute;
        top: 0.25rem;
        left: 0.4rem;
        z-index: 5;
        display: block;
        width: 0.5rem;
        height:  0.5rem;
        img{
          display: block;
          width: 100%;
          height: auto;
        }
      }
      .module_name{
        display: block;
        font-size: 0.36rem;
        color: #fff;
        line-height: 0.98rem;
      }
    }
    .wego_info_pane{
      position: relative;
      padding:  0.26rem 0;
      display: flex;
      align-items: center;
      justify-content: center;
      .pl36{
          padding-left: 0.36rem
        }
      .pr36{
        padding-right: 0.36rem;
      }
      .pl40{
        padding-left: 0.4rem;
      }

      .wego_info_item, .wego_info_other{
        flex-wrap: nowrap;
        flex-direction: row;
        flex-basis: 50%;
        text-align: center;
        .wego_item_list{
          margin:  0 auto;
          padding: 0.34rem 0;
          width: 4rem;
          height: auto;
          background: #2b324e;
          border-radius:  0.2rem;
          &>h4{
            font-size: 0.32rem;
            line-height: 0.4rem;
            .icon-qiandai{
              font-size: 0.26rem;
              color: #aeb0ba;
            }
            .icon-group {
              font-size: 0.26rem;
              color: #aeb0ba;
            }
          }
          .wego_item_money{
            font-size: 0.36rem;
            font-weight: 500;
            line-height:  0.58rem;
            color: #fff;
          }
        }
      }
      .wego_info_other{
        padding: 0.2rem 0 0;
        &>h4{
          font-size: 0.22rem;
          line-height: 0.4rem;
          font-weight: 400;
          color: #aeb0ba;
        }
        &>p{
          font-size: 0.36rem;
          line-height:  0.58rem;
          font-weight: 500;
          color: #fff;
        }
      }
    }

    .midLine{
      position: absolute;
      z-index: 7;
      width: 1px;
      height: 0.2rem;
      background: #545c7a;
      left: 50%;
      top: 50%;
    }
    .ptinit{
      padding-top: 0;
    }
    .pinit{
      padding: 0;
    }
  }
</style>

